#include "Test.h"
#include "Mock.h"

/*
class TestMock : public Test, public Mock {
	virtual void before() {
		if (recordMode) {
			actual("virtual void Test::before()");
		} else {
			expect("virtual void Test::before()");
		}
	};
	virtual void run() {
		actual("virtual void Test::run()");
	};
	virtual void after() {
		actual("virtual void Test::after()");
	};
};

class TestLoggerMock : public TestLogger {
	friend class TestLoggerMockController;
private:
//	TestLoggerMock() {};
	std::deque<std::string> expectedCalls;

	MethodParam<std::vector<TestSuite> > testSuitesParam;
public:
	virtual void write(const std::vector<TestSuite>& testSuites) {
		// actual
	};
	virtual int lala(std::string riri) {
		// actual
		return 5;
	};
	void verify() {
//		testSuitesParam.verify();
	};
};


class TestLoggerMockController {
private:
	TestLoggerMock testLoggerMock;
public:
	void write(const std::vector<TestSuite>& testSuites) {
		testLoggerMock.expectedCalls.push_back("virtual void TestLogger::write(const std::vector<TestSuite>& testSuites)");
	};
	std::pair<int, void*> lala(std::string riri) {
		testLoggerMock.expectedCalls.push_back("virtual int TestLogger::lala(std::string riri)");
//		return 5;
	};
	void verify() {
		testLoggerMock.testSuitesParam.verify();
	};
};

class TestRunnerTestSuite : public Test {
protected:
	TestLoggerMock* testLoggerMock;
	TestRunner* testRunner;
public:
	virtual void before() {
//		testLoggerMock = new TestLoggerMock();
//		testRunner = new TestRunner(*testLoggerMock);
	}
	virtual void after() {
		delete testLoggerMock;
		delete testRunner;
	}
};

TEST_FIXTURE(TestRunnerTestSuite, TestRunResultName) {
//	InvalidBeforeTestTest invalidBeforeTestTest;
//	testRunner->add("InvalidBeforeTestTestSuite", "InvalidBeforeTestTest", &invalidBeforeTestTest);

	TestMock test1;
	testRunner->add("InvalidBeforeTestTestSuite", "InvalidBeforeTestTest", &test1);
	
	std::vector<TestSuite> testSuites;
	testLoggerMock->write(testSuites);
	testRunner->run();

	assertEquals("method count!", 1, testLoggerMock->actual.size());
	assertEquals("Target name invalid!", "all", testLoggerMock->actual[0].targetName);
	
	TestRunResult& testRunResult = testLoggerMock->actual[0];
	assertEquals("Suite count invalid!", 1, testRunResult.testSuites.size());
	assertEquals("Suite name invalid!", "InvalidBeforeTestTestSuite", testRunResult.testSuites[0].testSuiteName);
	assertEquals("Test count invalid!", 1, testRunResult.testSuites[0].testResults.size());
	assertEquals("Test name invalid!", "InvalidBeforeTestTest", testRunResult.testSuites[0].testResults[0].testName);
	
//	testLoggerMock->verify();
}
*/